import type { Graph } from "@antv/x6";

const NodeId = "EndNode";
const NodeLabel = "结束";

const properties = [
  {
    groupName: "通用",
    groupId: "common",
    items: [{
      "key": "name", 
      "name": "名称",
      "val": "",
      "valType": "String"
    },{
      "key": "description", 
      "name": "描述", 
      "val": "",
      "valType": "String"
    }]
  },{
    groupName: "参数",
    groupId: "params",
    items: []
  }
]

export const createEndNode = (graph:Graph)=>{
    const node = graph.createNode({
        shape: "rect",
        width: 80,
        height: 30,
        label: NodeLabel,
        attrs: commonAttrs,
        data: {
            id: NodeId,
            properties: properties
        }
    })
    return node;
}

export const getEndDropNode=(node:any)=>{
    return node;
}


const commonAttrs = {
  body: {
      fill: '#fff',
      stroke: '#8f8f8f',
      strokeWidth: 1,
  },
}